<script type="text/javascript">
 /* <![CDATA[ */
  function onEventDate(a) {
    var div = a.nextSibling.nextSibling;
    var id = div.id;

    params = "node=" + id + "&opened=" + toggleDisplay(div);
  }
/* ]]> */
</script>

<p id="overview_link" >
  <%= image_tag("arrows.gif") %>
  <%= link_to "Overview", {:controller => "ecases" , :action => :show, :id => @ecase.id } %>
</p>
<div class="events" >
  <% events = @ecase.events -%>
  <% unit = @ecase.timeunit -%>
  <% dates = (events.map(&get_event_date_map_block(unit))).uniq.sort -%>
  <% unless dates.empty? -%>
    <ul>
      <%= render :partial => "/ecases/event_date", :collection => dates, 
        :locals => {:events => events, :unit => unit} %>
    </ul>
  <% end -%>
</div>